<?php
abstract class mcz_ErrorHandler
{
    public static function initialize()
    {
        set_error_handler(array("mcz_ErrorHandler", "handleError"));
    }

	public static function uninitialize()
    {
        restore_error_handler();
    }

    public static function handleError($errno, $errstr, $errfile, $errline, $errcontext)
    {
        throw new mcz_Exception($errstr, $errno, $errfile, $errline, $errcontext);
    }
}